#include "sdkGlobal.h"
#include "platform_global.h"
#include "platform_balance_query.h"


typedef struct
{
    TransmitBalanceQueryOnlineFunc mTransmitOnlineFunc;
    TransShowPlatformFunc mTransShowFunc;
    RecordPlatformFunc mRecordPlatformFunc;
    TransmitDataPlatformFunc mTransmitDataPlatformFunc;
} platform_balance_query_entity;

static platform_balance_query_entity g_platform_balance_query_entity;

void platform_balance_query_init()
{
    memset(&g_platform_balance_query_entity, 0x00, sizeof(g_platform_balance_query_entity));
}

void platform_balance_query_set_transmit_online_func(TransmitBalanceQueryOnlineFunc func)
{
    g_platform_balance_query_entity.mTransmitOnlineFunc = func;
}

TransmitBalanceQueryOnlineFunc platform_balance_query_get_transmit_online_func()
{
    return g_platform_balance_query_entity.mTransmitOnlineFunc;
}

void platform_balance_query_set_show_func(TransShowPlatformFunc *flowFunc)
{
    memcpy(&g_platform_balance_query_entity.mTransShowFunc, flowFunc, sizeof(TransShowPlatformFunc));
}

TransShowPlatformFunc *platform_balance_query_get_show_func()
{
    return &g_platform_balance_query_entity.mTransShowFunc;
}

void platform_balance_query_set_transmit_data_func(TransmitDataPlatformFunc *platformFunc)
{
    memcpy(&g_platform_balance_query_entity.mTransmitDataPlatformFunc, platformFunc, sizeof(TransmitDataPlatformFunc));
}

TransmitDataPlatformFunc *platform_balance_query_get_transmit_data_func()
{
    return &g_platform_balance_query_entity.mTransmitDataPlatformFunc;
}

void platform_balance_query_set_record_func(RecordPlatformFunc *platformFunc)
{
    memcpy(&g_platform_balance_query_entity.mRecordPlatformFunc, platformFunc, sizeof(RecordPlatformFunc));
}

RecordPlatformFunc *platform_balance_query_get_record_func()
{
    return &g_platform_balance_query_entity.mRecordPlatformFunc;
}
